android versions

Biggs' Apps

for Android devices

  • android home
  • apps
  • testing
  • rants (main)
  • about biggs
  • crossroads

Kicking and Screaming

My Descent into Kotlin

This is the first of my rants while learning Kotlin


August 19, 2020

var vs val

Ok, time to learn kotlin. Shouldn't be a big deal--I've learned dozens of languages, and everyone everywhere is talking about how it's the best thing since sliced bread. Yay!

But...I'm highly suspicious precisely because so many people are going out of their way to talk about how great it is. It's almost impossible to find negative remarks at all, especially in any of the official channels. Reminds me of all the fan-boys talking about how great the last Star Wars movie is, and how wonderful that we finally get a director like JJ Abrams to direct it. Uh oh.

Open mind--got to keep an open mind. And Scotty, if you can learn Smalltalk, Lisp (and love it), how hard can this be? After all, we've had decades of experience writing computer languages, this has to be something pretty good.

Find the official otlin website--looks slick, ok. Start reading. Less than ONE MINUTE into reading and I see a mistake that boggles my mind.

Variables are declared with var.
Immutables are declared with val.

You know, these concepts are very important. One should not mistake one for the other. In Java everything is a variable, unless it is prefixed with the clearly-understandable word const. Works pretty well--I'll never mistake one for the other. I'll never mistype one for the other. Auto-correct will never change one for the other. Clear as a bell. Lots of other languages are similar.

But for some reason, the designers of kotlin thought that having two very important key-words that differ only by their last letter to denote nearly opposite meanings was a good idea! Not only is it a horribly bad decision, it implies that the designers really don't think things through. Anyone who can let design this obviously poor slip by can let any bad idea slip by.

It's like going to a barbershop and you see photos on the wall of people with really bad haircuts. You just know that the people who work there have terrible taste. The chance that you'll get leave with a good haircut is slim to null.

I can get used to lots of things--I even got used to having to capitalize all key-words in Pascal and MODULA-2. But this is something that smacks me of poor judgement every single time I type it. It's possible that I'll never get over this bizarre choice.

Perhaps the authors of Kotlin are Chinese. There are plenty of similar characters in the Chinese written language. These two characters are mo and wei. They mean treetop and not yet.

But at least these don't mean the complete opposite of each other.

So why did the designers of kotlin do this? Stupidity? Arrogant inattention to detail? Or was this purposefully done? If it was purposeful, to what end?

This is not a rhetorical question; someone please tell me!


"Android Evolution" created by Manu Cornet, http://www.bonkersworld.net. All else is copyright 2020 by Scott M. Biggs and Sleep Furiously Productions. Not that that means much these days.